<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>adc</title>
  <script crossorigin  type="module" th:src="@{{domain}js/div_import_0.0.0-dataease.js(domain=${vo.domain})}"></script>
</head>
<body>
<div id="app"></div>

</body>
<script th:inline="javascript" type="module">
  window.onload = () => {
    var xhr = new XMLHttpRequest();
    var account = [[${vo.account}]]
    var url = `/token/${account}`
    var domain = [[${vo.domain}]]
    xhr.onreadystatechange = function () {
      if (xhr.readyState == 4 && xhr.status == 200) {
        const token = xhr.response
        const dataease = new DataEaseBi('Datasource', {
          baseUrl: domain,
          token: token
        })
        dataease.initialize({ container: '#app' })
      }
    }
    xhr.open('get', url, true);
    xhr.send();
  }



</script>
</html>
